setSource

open fun setSource(idx: Int)

Sets and plays the source specified by its zero-based index in the playlist.

If the provided index is out of bounds, it will be wrapped to a valid index within the playlist. Playback of the source (or initiation of its display logic) starts immediately.

Parameters

idx

The index of the source in the playlist to display.


open fun setSource(source: Source)

Sets and plays the specified Source from the playlist.

The source must be part of the current module's playlist. Playback/display of the source starts immediately.

Parameters

source

The Source object to display. It must exist in the current playlist. If null, no action is taken.


open fun setSource(idx: Int, play: Boolean)

Sets the current source by its zero-based index in the playlist.

If the provided index is out of bounds, it will be wrapped to a valid index.

Parameters

idx

The index of the source in the playlist.

play

If true, playback/display of the source starts immediately. If false, the source is set as current, but playback is not initiated (e.g., for pre-setting a starting point).


open fun setSource(source: Source, play: Boolean)

Sets the current Source.

The source must be part of the current module's playlist.

Parameters

source

The new Source to set as current. It must exist in the current playlist. If null, no action is taken.

play

If true, playback/display of the source starts immediately. If false, the source is set, but playback/display is not initiated.